<extend name="Public:Base" />
<block name="content">
<div class="breadcrumbs">
	你的位置：
	<a href="/">{:C('WEB_NAME')}</a>
	<small>&gt;</small>
	<a href="category-{$vo.cid}.do" title="查看{$vo.cid|GTC='Category'}中的全部文章">{$vo.cid|GTC='Category'}</a>
</div>
<header class="article-header">
	<h1 class="article-title">
		<a href="{$vo.id}.do">{$vo.title}</a>
	</h1>
	<div class="meta">
		<span class="muted">
			<a href="category-{$vo.cid}.do">
				<i class="icon-list-alt icon12"></i>
				{$vo.cid|GTC='Category'}
			</a>
		</span>
		<span class="muted">
			<i class="icon-user icon12"></i>
			<a href="/">{$vo.author}</a>
		</span>
		<time class="muted">
			<i class="ico icon-time icon12"></i>
			{$vo.create_time|toDate='Y-m-d H:s'}
		</time>
		<span class="muted">
			<i class="ico icon-eye-open icon12"></i>
			{$vo.hit}浏览
		</span>
		<span class="muted">
			<i class="icon-comment icon12"></i>
			<a href="{$vo.id}.do#comments">{$vo.id|getCommentCount}评论</a>
		</span>
	</div>
</header>

<article class="article-content">{$vo.content|getContent}</article>

<footer class="article-footer">
	<div class="article-tags">
		继续浏览有关
		<?php
		if(!empty($vo['tags'])){
			$tags=explode(',',$vo['tags']);
			$tagstr=array();
			foreach ($tags as $k => $v) {
				echo ('<a rel="tag" href="tag_'.$v.'.do">'.$v.'</a>');
			}
		}
		?>
		的文章
	</div>
	<div class="share">
		<div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare">
			<div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a title="分享到QQ空间" href="#" class="bds_qzone" data-cmd="qzone"></a><a title="分享到新浪微博" href="#" class="bds_tsina" data-cmd="tsina"></a><a title="分享到腾讯微博" href="#" class="bds_tqq" data-cmd="tqq"></a><a title="分享到人人网" href="#" class="bds_renren" data-cmd="renren"></a><a title="分享到网易微博" href="#" class="bds_t163" data-cmd="t163"></a></div>
			<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{},"image":{"viewList":["qzone","tsina","tqq","renren","t163"],"viewText":"分享此文到：","viewSize":"16"}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=86835285.js?cdnversion='+~(-new Date()/36e5)];</script>
		</div>
	</div>
</footer>

<nav class="article-nav">
	<span class="article-nav-prev">
		上一篇
		<neq name="pre.id">
		<a href="{$pre.id}.do" rel="prev">{$pre.title}</a>
		<else />
		<a href="#" rel="prev">没有了</a>
		</neq>
	</span>
	<span class="article-nav-next">
		下一篇
		<neq name="next.id">
		<a href="{$next.id}.do" rel="prev">{$next.title}</a>
		<else />
		<a href="#" rel="prev">没有了</a>
		</neq>
	</span>
</nav>
<empty name="AboutList">
<else />
<div class="relates">
	<h3>与本文相关的文章</h3>
	<ul>
		<volist name="AboutList" id="AboutVo">
		<li>
			<a href="{$AboutVo.id}.html" title="{$AboutVo.title}">{$AboutVo.title}</a>
		</li>
		</volist>
	</ul>
</div>
</empty>
<div id="respond" class="no_webshot">
	<div class="comt-title">
		<div class="comt-avatar pull-left"><img alt="" src="__PUBLIC__/noavatar.png" height="28" width="28"></div>
		<div class="comt-author pull-left">游客<span>发表我的评论</span>&nbsp;
			<a class="switch-author" href="javascript:;" data-type="switch-author" style="font-size:12px;">换个身份</a>
		</div>
		<a id="cancel-comment-reply-link" class="pull-right" href="javascript:;" style="display: none; ">取消评论</a>
	</div>
	<div class="comt">
		<div class="comt-box">
			<textarea placeholder="写点什么..." class="input-block-level comt-area" name="comment" id="CommentContent" cols="100%" rows="3" tabindex="1" onkeydown="if(event.ctrlKey && event.keyCode==13){document.getElementById('CommentSubmit').click();return false};"></textarea>
			<div class="comt-ctrl">
				<button class="btn btn-primary pull-right" type="button" id="CommentSubmit" tabindex="5" style="opacity: 1;"> <i class="icon-ok-circle icon-white icon12"></i>
					提交评论
				</button>
				<div class="comt-tips pull-right">
					<input type="hidden" name="commentid" id="comment_commentid" value="0">
					<div class="comt-tip comt-loading" style="display: none; ">正在提交, 请稍候...</div>
					<div class="comt-tip comt-error" style="display: none; " id="CommontTips">#</div>
				</div>
				<!-- <span data-type="comment-insert-smilie" class="muted comt-smilie"> <i class="icon-thumbs-up icon12"></i>
					表情
				</span> -->
				<span class="muted comt-mailme">
					<label for="comment_mail_notify" class="checkbox inline" style="padding-top:0">
						<input type="checkbox" name="comment_mail_notify" id="comment_mail_notify" value="1" checked="checked">有人回复时邮件通知我</label>
				</span>
			</div>
			<!-- <div id="comment-smilies" class="hide" style="display: block; "><img data-simle="mrgreen" src="../Public/images/bq/mrgreen.gif"></div> -->
		</div>
		<div class="comt-comterinfo" id="comment-author-info" style="display:none">
			<h4>Hi，您需要填写昵称和邮箱！</h4>
			<ul>
				<li class="form-inline">
					<label class="hide" for="author">昵称</label>
					<input class="ipt" type="text" name="author" id="author" value="生生世世" tabindex="2" placeholder="昵称">
					<span class="help-inline">昵称 (必填)</span>
				</li>
				<li class="form-inline">
					<label class="hide" for="email">邮箱</label>
					<input class="ipt" type="text" name="email" id="email" value="asdasd@qqc.om" tabindex="3" placeholder="邮箱">
					<span class="help-inline">邮箱 (必填)</span>
				</li>
				<li class="form-inline">
					<label class="hide" for="url">网址</label>
					<input class="ipt" type="text" name="url" id="url" value="http://www.qdblog.com/kabasijishuang11.html" tabindex="4" placeholder="网址">
					<span class="help-inline">网址</span>
				</li>
			</ul>
		</div>
	</div>
</div>
<div id="wp-temp-form-div" style="display: none; " ></div>
<div id="postcomments">
	<h3 id="comments">
		网友最新评论 <b>(1)</b>
	</h3>
	<ol class="commentlist">
		<volist name="CommentList" id="CommentVo">
		<li class="comment even thread-even depth-1">
			<div class="c-avatar">
				<img alt="" height="36" width="36" src="__PUBLIC__/noavatar.png" style="display: block; ">
			</div>
			<div class="c-main">
				{$CommentVo.content}
				<div class="c-meta">
					<span class="c-author">
						<a href="{$CommentVo.url}" rel="external nofollow" class="url" target="_blank">{$CommentVo.nickanme}</a>
					</span>
					{$CommentVo.create_time|toDate='Y-m-d H:i:s'}
					<a class="comment-reply-link" href="#" rel="{$CommentVo.id}" >回复</a>
				</div>
			</div>
			<empty name="CommentVo._child">
			<else />
			<ul class="children">
				<volist name="CommentVo._child" id="CommentChildVo">
				<li class="comment even depth-2">
					<div class="c-avatar"><img alt="" src="__PUBLIC__/noavatar.png" height="36" width="36"></div>
					<div class="c-main">
						<p>{$CommentChildVo.content}</p>
						<!-- <span class="c-approved">您的评论正在排队审核中，请稍后！</span>
						<br> -->
						<div class="c-meta">
							<span class="c-author">
								<a href="#" rel="external nofollow" class="url">游客</a>
							</span>
							{$CommentChildVo.create_time|toDate='Y-m-d H:i:s'}
						</div>
					</div>
					<!-- <span id="success_1">提交成功</span>
					<span></span> -->
				</li>
				</volist>
			</ul>
			</empty>
		</li>
		</volist>
		<!-- #comment-## -->
	</ol>
	<div class="pagenav">{$CommentPage}</div>
</div>
</block>
<block name="__body">
	<script type="text/javascript" src="__PUBLIC__/Js/prettify/src/prettify.js"></script>
	<script type="text/javascript">
		$(function(){
			$('.switch-author').click(function(){ $('#comment-author-info').toggle();});
			//$('pre').attr('class',"prettyprint lang-php linenums");
		    prettyPrint();
			$('.happy').bind('click',function(){
				var self=$(this);
				var id=self.attr('href').replace('##','');
				$.ajax({
					url:'Article-setgood-id-'+id+'.do',
					dataType:'json',
					success:function(msg){				
						if(msg['status']=="1"){
							self.unbind('click');
							minimsg(msg['info']);
							self.html(parseInt(self.html())+1);
						}
					}
				});
				self.click(function(){});
			});
			$('.sad').bind('click',function(){
				var self=$(this);
				var id=self.attr('href').replace('##','');
				$.ajax({
					url:'Article-setbad-id-'+id+'.do',
					dataType:'json',
					success:function(msg){				
						if(msg['status']=="1"){
							self.unbind('click');
							minimsg(msg['info']);
							self.html(parseInt(self.html())+1);
						}
					}
				});
			});
			$('.comment-reply-link').click(function(){
				$(this).parents('.comment').append($('#respond'));
				$('#comment_commentid').val($(this).attr('rel'));
				$('#cancel-comment-reply-link').show();
				return false;
			});
			$('#cancel-comment-reply-link').click(function(){
				$(this).show();
				$('#comment_commentid').val(0);
				$('#wp-temp-form-div').before($('#respond'));
			});
			$('#CommentSubmit').click(function(){
				$('#CommontTips').hide();
				var content=$('#CommentContent').val();
				if (content.length>2000000 || content.length ==0){
					$('#CommontTips').html('只能输入0-2000000个字符!').show();
				}else{
					$('.comt-loading').show();
					$.ajax({
					    type: "POST",
					    url: "Article_postcomment.do",
					    data:"module=Article&pid={$vo.id}&commentid="+$('#comment_commentid').val()+"&comment_mail_notify="+$('#comment_mail_notify').val()+"&content="+content,
					    dataType:'json',
					    success: function(msg){
							if(msg.status=="1"){
								location.reload();
							}else{
								$('#CommontTips').html(msg.info).show();
							}
					    },
					    complete:function(){
							$('.comt-loading').hide();
					    }
					});
				}
			});
		});
	</script>
</block>